#include <gmlib/sm2/internal/sm2p256v1.h>
#include <stdexcept>
#include <cstring>

using namespace sm2::internal;

void test_sm2_fn_inv()
{
    sm2_fn_t    a, c;
    std::uint8_t c_data[32];

    static std::uint8_t a0[32] = {0xc5,0x48,0x0e,0x5f,0xbf,0x38,0x2c,0x73,0x69,0xa3,0xef,0xcd,0x0d,0x4e,0x5e,0x41,0x1e,0x49,0x27,0xbe,0xd7,0x22,0x05,0x94,0x85,0x87,0x4d,0x45,0xbf,0x47,0x1f,0x72};
    static std::uint8_t c0[32] = {0xdb,0xfc,0xf0,0xc8,0x8d,0xfc,0xfe,0x5a,0x6c,0x46,0x34,0x2d,0x73,0x0e,0x56,0x4a,0xa6,0xce,0xd8,0xdf,0x5c,0x13,0xa8,0x14,0x5f,0x61,0xfd,0xa9,0xec,0x74,0x2e,0x18};
    sm2_fn_from_bytes(a, a0);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c0, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a1[32] = {0x2a,0x42,0x7c,0xff,0x0f,0x65,0x7f,0x61,0x2a,0x67,0x11,0x0d,0x94,0x37,0xe8,0xe1,0xb2,0x19,0x5c,0xd1,0xea,0x45,0x10,0x2b,0xce,0x88,0x59,0x70,0xaf,0x67,0x40,0x80};
    static std::uint8_t c1[32] = {0x53,0xaa,0xca,0xe7,0xaa,0x6a,0xfd,0xd6,0x4f,0x8f,0x88,0x8d,0x95,0x2d,0x15,0x31,0x9f,0xe1,0x4d,0x1b,0x48,0xa2,0x53,0x73,0x62,0xeb,0x5b,0x87,0x00,0xee,0x9f,0x1b};
    sm2_fn_from_bytes(a, a1);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c1, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a2[32] = {0x23,0xc0,0x84,0x2c,0x3d,0xa4,0xfb,0x4a,0x19,0xd7,0x1e,0xf4,0x81,0x54,0x3e,0x44,0x48,0x9a,0x89,0xc8,0xf9,0x68,0x8e,0x12,0x65,0x02,0xaa,0xd9,0x2f,0xe9,0x01,0xa8};
    static std::uint8_t c2[32] = {0xc6,0x24,0x40,0xac,0x76,0xf2,0x84,0xc8,0xf6,0x21,0xb2,0x39,0xd4,0xe7,0xf5,0x00,0x7e,0x29,0x62,0xd2,0xee,0x22,0x36,0x0b,0x2b,0x88,0x36,0xfd,0xd9,0x8d,0x05,0xa8};
    sm2_fn_from_bytes(a, a2);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c2, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a3[32] = {0xcb,0x72,0x8e,0xf8,0x84,0xd8,0x33,0x18,0xcd,0x19,0x3b,0xa4,0x26,0x8e,0x84,0xd7,0x29,0x5b,0x73,0x12,0xa9,0x75,0xeb,0x51,0x82,0x57,0x7a,0x05,0xfa,0x6c,0x66,0x32};
    static std::uint8_t c3[32] = {0x80,0xcf,0x46,0x65,0xf7,0x04,0x62,0xaf,0xe2,0x58,0x7d,0x2a,0x4f,0x4f,0x3f,0x39,0x77,0x93,0x9a,0x8d,0x89,0x9d,0xab,0xb1,0xe3,0xfa,0x2f,0xeb,0x5f,0x3c,0x33,0x16};
    sm2_fn_from_bytes(a, a3);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c3, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a4[32] = {0x05,0x10,0x3e,0x7c,0xa5,0xfd,0xdc,0x09,0x0c,0xe2,0x29,0x3d,0xff,0x1c,0xa4,0x80,0x8d,0xa2,0xcf,0x6c,0x91,0x68,0x7c,0x4b,0x8e,0x39,0x97,0x76,0x42,0x21,0xb3,0x49};
    static std::uint8_t c4[32] = {0x2a,0x80,0xa7,0xf8,0xd6,0x3f,0xd8,0x3c,0xea,0xda,0x0c,0x36,0x71,0xc3,0x94,0xc6,0x8c,0x10,0x25,0xfe,0x56,0xf9,0xca,0xf8,0x2b,0x31,0x95,0x17,0x25,0x2e,0x3d,0x2b};
    sm2_fn_from_bytes(a, a4);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c4, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a5[32] = {0x93,0x5c,0xd3,0xb2,0x51,0x06,0x78,0x47,0x5e,0x30,0x31,0x29,0x8a,0x54,0xd2,0x89,0x24,0xd7,0x7b,0x3e,0x4b,0x6c,0xac,0x8e,0x49,0x5f,0x70,0xcf,0x73,0x2d,0xeb,0xf1};
    static std::uint8_t c5[32] = {0x9b,0x35,0x87,0xf1,0x59,0x33,0x54,0xd3,0xa9,0xd9,0x9c,0xc9,0x3d,0xa1,0x13,0x93,0x44,0x37,0x2f,0xe1,0xfd,0xff,0x1a,0xac,0x4c,0x02,0x6e,0x8b,0xf3,0x42,0xb2,0xf8};
    sm2_fn_from_bytes(a, a5);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c5, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a6[32] = {0x37,0xfa,0xee,0xca,0x20,0x10,0x06,0xe2,0xcd,0xcd,0x71,0x10,0x47,0x05,0x4a,0x29,0x2c,0x3d,0x44,0x6c,0xdf,0xf8,0x51,0x7b,0x3d,0x6a,0xda,0x7c,0x3e,0xef,0x77,0x89};
    static std::uint8_t c6[32] = {0xbc,0x50,0x46,0x90,0x24,0x54,0xb3,0x16,0x42,0x47,0xa8,0xde,0xc3,0x16,0x54,0xaa,0xbe,0xb6,0x68,0xfb,0x92,0x02,0x20,0xab,0x69,0x0c,0x08,0x7e,0x0a,0xd5,0x70,0x19};
    sm2_fn_from_bytes(a, a6);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c6, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a7[32] = {0x09,0xfe,0xe0,0xdb,0xd0,0x8e,0xa1,0x87,0xce,0xd8,0x73,0xd9,0x6e,0xd0,0x57,0x02,0x6d,0x6c,0xcd,0x2f,0xfd,0x87,0x1c,0x80,0x90,0x7f,0xb8,0xfd,0x36,0x58,0x32,0xf3};
    static std::uint8_t c7[32] = {0x18,0x97,0x12,0xa5,0xd4,0xfc,0xd4,0x5d,0x53,0xdd,0x0b,0x00,0x4d,0x89,0x10,0x33,0x89,0xcf,0x09,0x56,0x08,0x9a,0x7e,0xfb,0x01,0x12,0xad,0xd1,0x38,0x85,0xfc,0xcf};
    sm2_fn_from_bytes(a, a7);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c7, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a8[32] = {0x8d,0xc8,0x2b,0x59,0xc1,0xcc,0xc4,0x95,0x1c,0x81,0x4e,0xd1,0xfe,0xb6,0x77,0x9b,0x3f,0x9b,0xed,0x15,0xb8,0xdd,0xf6,0xd2,0x18,0x7e,0xe1,0x9c,0xf4,0x70,0xfe,0xff};
    static std::uint8_t c8[32] = {0x26,0x3f,0x0a,0x58,0xd5,0xa1,0x0b,0xf8,0xee,0xc3,0xf7,0x67,0x5d,0x7c,0xea,0x1a,0x92,0x81,0xbb,0xe5,0x05,0xb4,0x11,0x95,0x9f,0xaa,0xf6,0xe7,0x5b,0x59,0xe5,0x00};
    sm2_fn_from_bytes(a, a8);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c8, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a9[32] = {0xdc,0xee,0xe1,0x1c,0xcb,0x17,0x2b,0x78,0xd4,0xcd,0x5e,0xb6,0x17,0xd3,0x9b,0x15,0xe0,0x4e,0x85,0xc9,0x07,0x78,0x7f,0xd9,0x14,0x61,0x3c,0xb5,0x81,0x29,0xad,0xa5};
    static std::uint8_t c9[32] = {0x61,0xe0,0x09,0xa6,0x93,0x8a,0x0e,0x6b,0xec,0x30,0x28,0x4d,0xb6,0x2f,0xaa,0x54,0xf6,0xa0,0x1f,0xe7,0xb1,0xaf,0x30,0x9d,0x4e,0x76,0xd8,0xce,0x52,0x99,0x0a,0x9e};
    sm2_fn_from_bytes(a, a9);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c9, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a10[32] = {0x5f,0x04,0x18,0x5d,0x21,0x02,0x00,0x8a,0x30,0xf5,0x84,0x40,0x36,0xb5,0x28,0x51,0x21,0xe7,0x0b,0x22,0xd8,0x23,0xe9,0xc4,0xf6,0x64,0x09,0xdd,0xc3,0xc7,0x0b,0x6d};
    static std::uint8_t c10[32] = {0x1f,0x69,0xeb,0x4c,0x80,0x70,0xa2,0xd9,0xb1,0x3e,0x0d,0x9f,0x4d,0x30,0x6e,0xae,0x5d,0xe6,0x07,0x6e,0x86,0x63,0xad,0xe3,0x86,0xb2,0x75,0x03,0x89,0x79,0xd3,0x1e};
    sm2_fn_from_bytes(a, a10);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c10, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a11[32] = {0x64,0x3f,0xcf,0xd2,0xd5,0x4b,0x29,0x57,0x67,0x11,0xd3,0x7f,0x7f,0x03,0x95,0x8c,0x26,0xa8,0xef,0x52,0x42,0xc3,0x4a,0xdd,0x58,0x5d,0xa5,0x00,0xd2,0xb4,0x05,0x98};
    static std::uint8_t c11[32] = {0x46,0x8c,0x35,0x4c,0x83,0x4b,0x53,0x65,0xfa,0xea,0x57,0xfa,0x3e,0xa8,0x51,0x3d,0xe8,0xf3,0x00,0x5c,0x62,0xe3,0x27,0xf9,0xf7,0x6c,0x79,0xf1,0xd0,0x61,0x18,0x87};
    sm2_fn_from_bytes(a, a11);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c11, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a12[32] = {0xf7,0x3e,0xa1,0x39,0xa0,0xbb,0x37,0xdc,0x47,0x2c,0xeb,0xca,0xbf,0xec,0x48,0x7c,0x43,0xbd,0x26,0x6d,0xc9,0xda,0xca,0xdb,0xb8,0x18,0x5b,0xa7,0xe4,0x24,0xfc,0x78};
    static std::uint8_t c12[32] = {0x64,0x4c,0x03,0x95,0x75,0x57,0x01,0xc0,0x06,0x70,0x0b,0x7b,0xc7,0xb0,0x71,0x8e,0x45,0x84,0xb2,0x73,0xcb,0x3a,0x80,0x1b,0xe2,0xf2,0x3b,0x10,0x48,0x5b,0x64,0xfd};
    sm2_fn_from_bytes(a, a12);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c12, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a13[32] = {0x13,0x60,0x7a,0x4d,0xe5,0x3f,0xdc,0x66,0xa3,0x63,0x30,0xa9,0xb0,0xa0,0x89,0x87,0x7a,0x42,0x47,0xdf,0x3c,0x9d,0x61,0xe7,0xa0,0x93,0xe5,0x53,0xf8,0x70,0x85,0x9c};
    static std::uint8_t c13[32] = {0x2c,0x41,0xe1,0x8a,0x50,0x42,0x5e,0xbd,0x27,0x7a,0x6f,0x69,0x9c,0xa7,0x0d,0x63,0xc4,0x0e,0x9a,0xe5,0x64,0xee,0xee,0x66,0x0c,0xfd,0xcb,0x10,0x73,0x57,0x2a,0xe0};
    sm2_fn_from_bytes(a, a13);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c13, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a14[32] = {0x10,0x34,0xaa,0xc8,0xbc,0x11,0xde,0x43,0x36,0xa5,0xc3,0x60,0x87,0xc4,0x1f,0x38,0x5a,0x3a,0xd6,0x69,0x1f,0x46,0x16,0x92,0x7f,0x56,0xbf,0x75,0xb7,0x29,0x7d,0x92};
    static std::uint8_t c14[32] = {0x0f,0x29,0xb7,0x48,0x88,0xc3,0x7f,0xb0,0xc0,0xd1,0xc8,0xff,0xa9,0xc8,0xc9,0xca,0x49,0x33,0xfb,0x75,0xc3,0x02,0x0d,0xca,0x93,0x88,0xa8,0x0b,0xc5,0x13,0xdd,0x75};
    sm2_fn_from_bytes(a, a14);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c14, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a15[32] = {0x05,0xc4,0xe6,0x53,0xa2,0xc5,0xb9,0x06,0x17,0x74,0xe0,0xfa,0x21,0xa6,0x33,0xf4,0xa9,0xbd,0xbb,0x17,0xc1,0x89,0x3f,0xa6,0x88,0xf9,0x66,0x02,0x0b,0xb5,0x8d,0x60};
    static std::uint8_t c15[32] = {0x44,0xf7,0x91,0x8b,0xf3,0x3a,0x58,0xfa,0x09,0x0d,0xb1,0x5c,0x23,0xcf,0x89,0xae,0x9a,0x5c,0xaa,0x50,0xf6,0x34,0x66,0x57,0x55,0xbc,0x23,0x22,0xc1,0x7d,0x2a,0x5d};
    sm2_fn_from_bytes(a, a15);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c15, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a16[32] = {0xe0,0x41,0x37,0x1f,0x48,0xc9,0xd4,0x51,0xa9,0x22,0x79,0x30,0x67,0x57,0x86,0x65,0x7b,0xe5,0xf6,0x5e,0x72,0x8d,0x6b,0x64,0x96,0x3c,0x02,0x4e,0xf7,0x91,0x46,0xe2};
    static std::uint8_t c16[32] = {0xf8,0xb1,0xa7,0x43,0xdb,0x25,0xdb,0xd7,0xd6,0x43,0x2d,0x15,0xce,0xac,0xa9,0x9e,0x58,0x3d,0x0e,0x21,0x2f,0x5e,0x9c,0xc5,0x71,0xe4,0xf0,0x45,0x13,0x99,0xc4,0xc7};
    sm2_fn_from_bytes(a, a16);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c16, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a17[32] = {0xfd,0xed,0x30,0xa7,0xf4,0x77,0x04,0x7d,0xb0,0x17,0x66,0xc5,0xe1,0xd4,0xe1,0xd4,0xf4,0x59,0x3e,0x27,0x77,0xc3,0x08,0x9a,0x69,0x5e,0xf3,0x69,0x70,0xf6,0x04,0x6d};
    static std::uint8_t c17[32] = {0xa9,0x9b,0xc7,0x4b,0x7f,0xdd,0xba,0x3f,0x57,0xdb,0x58,0xdf,0x99,0x4a,0xe1,0x39,0x1e,0x83,0xa6,0xff,0x81,0x39,0x40,0x39,0xdc,0x14,0x5d,0x48,0xe9,0xc3,0x59,0xd5};
    sm2_fn_from_bytes(a, a17);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c17, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a18[32] = {0x72,0xdb,0x33,0xe4,0x30,0x3c,0x45,0xe7,0x07,0x86,0x92,0x5f,0x65,0x1b,0x60,0xed,0xcd,0x25,0x0d,0x4c,0xd4,0xeb,0x7a,0x5e,0xe3,0x00,0x4d,0xde,0x22,0x83,0x86,0x32};
    static std::uint8_t c18[32] = {0x63,0xa3,0x51,0x34,0x02,0x14,0x2e,0xde,0x22,0x28,0x2d,0xbd,0x4e,0x99,0xd4,0x32,0x26,0x0a,0x91,0x1b,0x72,0x90,0xa4,0x68,0xb4,0x8b,0xd2,0xbc,0x45,0x6c,0x74,0xd3};
    sm2_fn_from_bytes(a, a18);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c18, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a19[32] = {0xd0,0x4e,0x1a,0x9d,0xea,0x94,0x17,0x47,0x7b,0xb8,0xd0,0x88,0x2a,0x55,0xfa,0xc2,0x98,0xdf,0xf5,0x79,0xcd,0x10,0x05,0xb8,0x2b,0xac,0x2a,0xbf,0x64,0xe0,0x2e,0xb0};
    static std::uint8_t c19[32] = {0x09,0x74,0xc2,0x2d,0xba,0xd2,0x35,0x55,0xa7,0xa5,0xd5,0x51,0x1e,0xe6,0x10,0x01,0x88,0xb4,0xbb,0x75,0xe3,0x5e,0x4e,0x57,0x40,0x41,0x97,0x46,0xfe,0xec,0xda,0x5f};
    sm2_fn_from_bytes(a, a19);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c19, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a20[32] = {0xcb,0xd0,0x90,0x32,0x33,0x24,0x9d,0x42,0xd8,0x86,0x17,0x2a,0xf0,0x53,0x8c,0x28,0x5f,0xee,0x26,0x49,0x5a,0x65,0x6c,0x5c,0x36,0x15,0x3d,0x6d,0x76,0x3e,0x9b,0x96};
    static std::uint8_t c20[32] = {0x33,0x56,0xde,0x22,0xe2,0x57,0x63,0x2f,0x00,0x0b,0xda,0x6e,0x6c,0x56,0x63,0x92,0xa8,0x0e,0xc6,0x3f,0xc8,0x31,0x1c,0xe3,0x99,0x1d,0x09,0xaf,0x23,0x28,0x40,0x70};
    sm2_fn_from_bytes(a, a20);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c20, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a21[32] = {0xd0,0x23,0x73,0xfe,0xff,0x6c,0x29,0x93,0xa0,0x26,0xd3,0x37,0xaa,0x8a,0x93,0xa9,0xbe,0xe2,0xf0,0xc3,0x14,0x03,0xf2,0xbe,0x54,0xb6,0x7e,0xf8,0x75,0x58,0x82,0xbd};
    static std::uint8_t c21[32] = {0xa0,0x76,0xc5,0x08,0x9e,0x29,0x66,0xcf,0x1b,0xb6,0x87,0x28,0x89,0x08,0x8d,0x32,0x59,0x7c,0x65,0xba,0x10,0x3a,0x18,0xe2,0xac,0xc7,0xef,0xa2,0xb5,0x4d,0x2c,0x51};
    sm2_fn_from_bytes(a, a21);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c21, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a22[32] = {0x56,0xdd,0x00,0x74,0x37,0xfa,0x6a,0x94,0x60,0x52,0x45,0xa4,0x8a,0x8e,0x48,0x23,0x6f,0xe6,0xa6,0xb2,0x96,0x28,0xcf,0x9b,0xe3,0x77,0x91,0xbe,0xa0,0x48,0x83,0x85};
    static std::uint8_t c22[32] = {0xf1,0x5f,0xe7,0x64,0xd0,0xf4,0x6e,0xf0,0xfa,0xfc,0x65,0x0b,0xba,0x1e,0x97,0xbc,0x3b,0xab,0x9c,0xff,0x1b,0x92,0x72,0x98,0x37,0x32,0x75,0x6b,0xb7,0x4f,0xf1,0xec};
    sm2_fn_from_bytes(a, a22);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c22, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a23[32] = {0x46,0xa4,0xc4,0xec,0x07,0xd5,0xe2,0xe7,0x59,0x42,0xb3,0xa7,0x2f,0xe9,0x0f,0x91,0x67,0xd0,0xf7,0xad,0xae,0xd1,0x2d,0x96,0x8f,0x1e,0xc1,0x23,0xc1,0xf2,0x83,0x76};
    static std::uint8_t c23[32] = {0x7e,0x3d,0x85,0x1e,0x04,0x21,0xb4,0x84,0x6f,0xdd,0x9d,0x44,0xd2,0xb2,0xde,0x60,0xd3,0xf0,0x82,0xef,0x3e,0x3b,0xc5,0xd1,0x3e,0x8e,0x6f,0x0b,0x03,0xe3,0x93,0xd9};
    sm2_fn_from_bytes(a, a23);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c23, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a24[32] = {0x3d,0x30,0x49,0x41,0x85,0x16,0x30,0x95,0xd2,0x55,0xfd,0xdb,0xd5,0x44,0x0f,0xa7,0xcc,0xd3,0x33,0x3b,0x72,0xbd,0x46,0x5d,0xc6,0x02,0x77,0xb6,0xe1,0xed,0x3e,0x99};
    static std::uint8_t c24[32] = {0x25,0x24,0x61,0xa7,0xd6,0x00,0xe9,0x77,0xda,0xa6,0x98,0x69,0x06,0x67,0xd1,0xfa,0x85,0xd5,0x99,0xfd,0x85,0x68,0x28,0xdc,0xa6,0x75,0xa0,0x78,0xff,0xd6,0xc3,0x96};
    sm2_fn_from_bytes(a, a24);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c24, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a25[32] = {0xfa,0xee,0x49,0xfb,0xc4,0x88,0x82,0x0e,0xaf,0xc8,0x4f,0x67,0x38,0xeb,0xb6,0xe2,0x80,0x1c,0xec,0x6d,0x7f,0x11,0x88,0xff,0x06,0xe0,0x6c,0x2f,0x73,0x2d,0x8d,0x3a};
    static std::uint8_t c25[32] = {0xe6,0xc8,0x99,0xe7,0x03,0x73,0x60,0x4f,0xfd,0xa2,0xff,0xbb,0x75,0x03,0x1d,0xab,0xe1,0x6c,0x05,0x49,0x1b,0xce,0x38,0x1d,0x8d,0x81,0x9c,0xd3,0x4d,0x4c,0x23,0xd0};
    sm2_fn_from_bytes(a, a25);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c25, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a26[32] = {0xa3,0x1e,0x19,0xd4,0x3d,0xaa,0x91,0x07,0xa5,0x96,0xf4,0x65,0x10,0x91,0x4a,0x3e,0x48,0xc4,0x8b,0xc1,0xe7,0xe8,0xfd,0x7e,0xf5,0x35,0x9b,0x79,0xb1,0xe9,0x32,0x2a};
    static std::uint8_t c26[32] = {0x83,0x29,0x40,0xb5,0xae,0x08,0xed,0x00,0x6b,0xc7,0x50,0x18,0xbe,0x91,0xc4,0xa2,0x79,0x13,0x39,0xf6,0x55,0x3e,0x59,0x32,0x87,0xbb,0x6a,0x56,0xec,0xf3,0x6f,0xbd};
    sm2_fn_from_bytes(a, a26);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c26, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a27[32] = {0x6d,0xb7,0x24,0x1a,0x77,0x2a,0x1b,0xc5,0xa1,0xe2,0xfa,0x6f,0x29,0xe3,0x92,0x20,0x22,0x2c,0x5a,0xd3,0x66,0x25,0x85,0x9e,0xc3,0x1f,0x03,0x2b,0x98,0x14,0xc3,0xed};
    static std::uint8_t c27[32] = {0x7c,0x90,0x67,0x51,0x4a,0x59,0x75,0x12,0x9b,0xd8,0xb1,0x61,0xcb,0x93,0xc6,0xeb,0xa8,0x4e,0x51,0xb7,0x30,0x57,0x22,0xaf,0x5b,0x12,0x77,0xf6,0x86,0x3f,0xa4,0xe5};
    sm2_fn_from_bytes(a, a27);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c27, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a28[32] = {0x47,0x12,0x72,0xf8,0x9d,0x7b,0x22,0x68,0x04,0xcc,0xb3,0xa7,0x4d,0x48,0x71,0x06,0x29,0x1c,0xb5,0x6f,0x29,0xf3,0xc5,0x1a,0x42,0x5b,0x34,0x6a,0x22,0x32,0x86,0x62};
    static std::uint8_t c28[32] = {0xa2,0x4d,0x04,0xaf,0xc7,0xc2,0xf4,0x9d,0x22,0x55,0x84,0x9c,0x82,0x07,0x40,0x7b,0xc2,0xc3,0x8e,0x05,0xde,0x45,0x84,0xb1,0xe5,0x42,0xd4,0x6d,0x37,0x4c,0x51,0x52};
    sm2_fn_from_bytes(a, a28);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c28, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a29[32] = {0x8c,0xdb,0x6d,0x0d,0x79,0xbe,0xe7,0x78,0x27,0x1a,0xea,0x89,0xad,0xb4,0x73,0x82,0xc0,0xc5,0x22,0xbe,0x0f,0xa1,0x7e,0x3d,0x5a,0xbc,0xc5,0xfc,0x0e,0xf1,0xe3,0xef};
    static std::uint8_t c29[32] = {0x50,0x92,0xd7,0x35,0x35,0x08,0x07,0x92,0x39,0xd1,0x09,0xde,0x4f,0x4e,0x24,0x1c,0x0a,0x71,0x69,0x92,0x4d,0x03,0x26,0xe9,0x39,0x49,0x84,0x7a,0x90,0x74,0xb3,0x54};
    sm2_fn_from_bytes(a, a29);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c29, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a30[32] = {0x18,0xf4,0x06,0x21,0x19,0x7c,0x0a,0xcd,0x2a,0x91,0x00,0x10,0x48,0xe8,0x24,0xfb,0xb5,0x2f,0x8b,0x14,0x18,0x85,0x04,0x85,0x2c,0xd8,0xee,0xbe,0x1c,0x64,0x07,0x86};
    static std::uint8_t c30[32] = {0x55,0xe5,0xf0,0xe4,0x4e,0x68,0x3b,0x17,0xa7,0xa1,0xdd,0x96,0x30,0x00,0xb3,0x5a,0xdf,0xdf,0x15,0xc4,0x5a,0xf4,0x0d,0x18,0x52,0x22,0x8a,0xff,0xbd,0x61,0x4c,0xb8};
    sm2_fn_from_bytes(a, a30);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c30, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a31[32] = {0xaa,0x99,0x8e,0x86,0xf8,0xa2,0xcf,0x1f,0xd4,0x8e,0x3b,0x21,0x94,0x55,0x06,0x56,0x91,0x91,0x09,0x73,0xa1,0x62,0x65,0xf8,0xc5,0x2f,0x49,0xe1,0x5a,0x2a,0xa2,0x18};
    static std::uint8_t c31[32] = {0x46,0x0e,0x01,0x0f,0x0c,0x44,0x56,0x8e,0xa0,0xe9,0xb3,0xb5,0xaf,0xcd,0x17,0x2a,0xcb,0x2f,0xd7,0x1c,0x8e,0x83,0x90,0x12,0xe2,0xfb,0x45,0xf2,0xe9,0xfa,0x96,0x4d};
    sm2_fn_from_bytes(a, a31);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c31, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a32[32] = {0x48,0x6b,0x50,0xeb,0xe6,0x67,0x4d,0x9f,0xb5,0xe2,0x38,0xec,0x05,0xd3,0xee,0x23,0xbe,0x03,0x0a,0x1a,0xf3,0xe8,0x3a,0x3f,0xfa,0x90,0x70,0x25,0xf8,0x21,0x34,0x6b};
    static std::uint8_t c32[32] = {0x02,0x6f,0x93,0x57,0x60,0xa3,0x51,0x2c,0xae,0x40,0x33,0x64,0xb1,0xad,0x91,0x6a,0x43,0xcf,0x32,0x74,0x31,0x2b,0x99,0x30,0x24,0x8c,0xa5,0x3f,0x5e,0x63,0xc1,0xca};
    sm2_fn_from_bytes(a, a32);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c32, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a33[32] = {0x3a,0xa8,0xde,0x79,0xa0,0x6c,0x30,0x72,0x9f,0xfd,0xac,0xfd,0x7e,0x94,0x26,0x61,0x4b,0xa5,0x5d,0xae,0xf4,0x54,0x93,0x79,0xa1,0x9b,0x1b,0xa5,0x0c,0x81,0x1c,0xfa};
    static std::uint8_t c33[32] = {0xf4,0x3d,0xc8,0x52,0x29,0x06,0xfa,0xef,0xb0,0x4f,0x20,0x10,0xec,0xba,0x72,0x90,0x32,0xa8,0xc0,0xfb,0x56,0xac,0xcb,0x34,0xca,0x6b,0x7e,0x0d,0x5f,0x8b,0x8c,0x85};
    sm2_fn_from_bytes(a, a33);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c33, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a34[32] = {0x70,0x54,0x17,0xa8,0x36,0x06,0x3c,0xcd,0xea,0x20,0x5e,0xe8,0xd0,0xbc,0x57,0x52,0x40,0xeb,0xab,0xc1,0xf8,0xb2,0x29,0x39,0x1e,0x5d,0xc0,0xff,0xe2,0xf7,0x63,0xf2};
    static std::uint8_t c34[32] = {0xc1,0xa8,0xc1,0xa6,0xa9,0x36,0x4c,0xc0,0x78,0x32,0xaf,0x74,0xf7,0x6b,0x2f,0xcc,0x55,0x14,0x78,0xe5,0xda,0x00,0xdf,0x30,0x23,0xd1,0x35,0x1a,0x43,0xca,0x30,0x2d};
    sm2_fn_from_bytes(a, a34);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c34, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a35[32] = {0x4c,0x47,0x69,0xfc,0x52,0xf9,0x2c,0x3c,0x7e,0x79,0x0f,0xb6,0xa2,0xe0,0x58,0x9d,0xba,0xf9,0xf1,0x90,0x4f,0x44,0x18,0x09,0x8d,0x8d,0x6b,0xe2,0x89,0x2f,0x86,0xbb};
    static std::uint8_t c35[32] = {0xbd,0xdc,0x62,0xb7,0x29,0x25,0xe2,0x3a,0xee,0x66,0xb8,0x41,0xec,0xa9,0x1e,0x85,0xce,0x74,0xb2,0xf3,0x12,0x64,0x38,0xbe,0xf8,0x09,0xf3,0x46,0x86,0x02,0x80,0xf5};
    sm2_fn_from_bytes(a, a35);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c35, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a36[32] = {0x49,0x51,0xd9,0x55,0x25,0xd3,0xfd,0xd6,0x23,0xb7,0xad,0xc6,0x35,0x22,0xab,0x9c,0x38,0x79,0xbb,0x49,0xdb,0xb4,0x25,0x00,0xe6,0xee,0x73,0x0d,0x20,0xa1,0x86,0xe7};
    static std::uint8_t c36[32] = {0xd2,0xda,0x3e,0x88,0xd7,0xfd,0xf7,0x75,0x1f,0x77,0x14,0xda,0x45,0x46,0x71,0xbb,0xae,0x69,0x80,0x2a,0xb6,0x89,0x25,0xbd,0x26,0xe9,0x12,0x02,0xae,0x9d,0xe6,0xa2};
    sm2_fn_from_bytes(a, a36);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c36, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a37[32] = {0x80,0xaa,0x20,0x0b,0xe3,0xac,0x7f,0x5e,0x27,0x5e,0x7c,0xb7,0xa4,0xdc,0x5d,0x99,0x04,0xde,0x2e,0x53,0x97,0x52,0x3c,0xbc,0x75,0x50,0x93,0x75,0xf0,0xc6,0xa7,0xe8};
    static std::uint8_t c37[32] = {0xb5,0x41,0x3a,0x37,0xec,0xbd,0x2a,0xf0,0x51,0x2c,0x62,0x23,0x5a,0x3a,0x96,0xe8,0xad,0x0f,0x26,0x13,0xf8,0x24,0xeb,0x5c,0x8d,0x53,0xa4,0xa3,0xde,0xd4,0x4b,0x50};
    sm2_fn_from_bytes(a, a37);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c37, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a38[32] = {0x18,0xa6,0xb1,0x65,0xf5,0xaa,0x0a,0x5f,0xf4,0x11,0x4a,0xa7,0x88,0x9c,0x11,0xf8,0x8e,0x12,0x98,0x8f,0xeb,0x4b,0x01,0x1e,0x94,0x11,0xea,0x45,0xa9,0xcb,0xd1,0x1f};
    static std::uint8_t c38[32] = {0x39,0xa4,0xde,0x32,0x56,0x35,0x6e,0x38,0xd6,0xdd,0xeb,0xb0,0xff,0x48,0xca,0x55,0xc4,0x0a,0x3d,0x23,0xcb,0xa1,0x9c,0x38,0x4f,0x0d,0x29,0xae,0x70,0x73,0x44,0xee};
    sm2_fn_from_bytes(a, a38);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c38, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a39[32] = {0xa0,0x9f,0xa8,0x5a,0xfd,0x81,0x3a,0x08,0x43,0x81,0x0d,0x75,0x1d,0x30,0x3c,0x02,0xa2,0xe3,0x9d,0xe8,0x70,0xc8,0xdd,0x31,0x90,0xa8,0x6d,0x67,0xf8,0x86,0x62,0xf6};
    static std::uint8_t c39[32] = {0xcb,0x1a,0xf5,0x58,0x65,0xea,0x38,0xae,0x2f,0x8a,0xdf,0x22,0xf4,0x02,0xfe,0x4a,0x31,0x07,0x76,0xa7,0x3e,0xc3,0xe2,0xaa,0x30,0x8f,0xe6,0xbf,0xd0,0x5c,0x6f,0xa5};
    sm2_fn_from_bytes(a, a39);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c39, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a40[32] = {0x4e,0x0c,0x8e,0xb9,0x03,0x9b,0xc0,0x6d,0xb7,0xb1,0x3f,0x74,0x5d,0xbd,0x09,0x6e,0x95,0xb2,0x6f,0x64,0x06,0xcf,0xb9,0x9f,0xe0,0x80,0x03,0x81,0x10,0x4d,0xe2,0x6e};
    static std::uint8_t c40[32] = {0xbc,0xe3,0xcc,0x0c,0x24,0x1e,0x6c,0x62,0x32,0x9f,0x63,0xa7,0x4e,0xba,0x65,0xe7,0xba,0x44,0xfb,0x0d,0x03,0xb4,0x66,0xfe,0xff,0xf9,0xb4,0x4a,0xf6,0xda,0x3c,0xae};
    sm2_fn_from_bytes(a, a40);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c40, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a41[32] = {0x6e,0xa2,0x84,0x65,0x16,0x1d,0xff,0x11,0xfd,0x5d,0xc1,0x40,0x49,0x36,0xc8,0xd1,0xca,0xde,0xb7,0xd7,0x73,0xf3,0x0d,0x18,0xae,0x31,0xc1,0x15,0x9f,0xf9,0x02,0xa0};
    static std::uint8_t c41[32] = {0xe3,0xd9,0xac,0x6e,0x0b,0xea,0xb8,0x76,0xb0,0x78,0x72,0xcc,0xb4,0xa9,0xc3,0xf9,0x95,0x85,0x81,0xb3,0xe6,0xfd,0xd9,0x40,0xa0,0x95,0x5c,0xc1,0xe5,0x39,0x6a,0xee};
    sm2_fn_from_bytes(a, a41);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c41, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a42[32] = {0x1b,0x1d,0xed,0x5b,0xce,0x13,0x7c,0xb8,0x49,0xc1,0x01,0x3b,0x8c,0xb0,0x47,0xfa,0xb0,0x0f,0x79,0x01,0xce,0xe5,0xa0,0xb6,0x14,0x84,0x4c,0x9c,0xcd,0xe8,0x9b,0xf7};
    static std::uint8_t c42[32] = {0x3b,0xd6,0x71,0xb5,0x88,0x49,0xca,0xaa,0x55,0xc4,0x3d,0x18,0xea,0x89,0x0b,0xf3,0xdd,0xf9,0x72,0x30,0xd5,0xe6,0x36,0x13,0x12,0x6e,0xc9,0x8d,0xd7,0x9a,0xfb,0x4f};
    sm2_fn_from_bytes(a, a42);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c42, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a43[32] = {0x79,0x4a,0xd2,0xcd,0x4b,0x93,0xf6,0xd5,0x4e,0x9d,0x82,0x0d,0xe7,0x27,0x79,0x77,0x0a,0x82,0xd9,0x60,0x3f,0xd1,0x92,0x14,0x85,0x7f,0xc8,0x91,0x28,0x84,0xe0,0x3e};
    static std::uint8_t c43[32] = {0xa9,0x1a,0x55,0x3c,0x84,0xac,0x53,0x0d,0xe4,0x6c,0x4b,0xc7,0x3b,0x75,0x3b,0xac,0x25,0x7f,0xea,0x48,0xf4,0xac,0x56,0x04,0xc8,0x2d,0xb1,0xb7,0x4c,0x7d,0xa3,0x41};
    sm2_fn_from_bytes(a, a43);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c43, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a44[32] = {0x02,0xff,0x46,0xb2,0xd4,0x7c,0x59,0x46,0xe1,0x27,0xfa,0x01,0xcc,0xc1,0x5c,0x44,0x6a,0x66,0xa5,0xa1,0x62,0x77,0xff,0xfe,0xdc,0xb3,0x2a,0xa9,0x43,0xb8,0xb6,0x1e};
    static std::uint8_t c44[32] = {0xac,0x68,0x5e,0x9f,0x5c,0xe5,0xe4,0xe9,0x46,0xf5,0x73,0x59,0xe2,0xf3,0xf3,0xcd,0xc3,0x74,0xe6,0x06,0x34,0x06,0x87,0x33,0x9d,0xde,0xe1,0xf0,0x49,0xe7,0x7a,0xee};
    sm2_fn_from_bytes(a, a44);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c44, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a45[32] = {0xfb,0xdc,0x1c,0x2a,0xfb,0x74,0x8f,0xdf,0x8d,0xe2,0x8e,0x5f,0x3f,0x3d,0xda,0xa2,0xc0,0x46,0xe8,0xb9,0x8c,0x34,0x14,0xae,0x9b,0x41,0x95,0xa9,0xd2,0xda,0xac,0x60};
    static std::uint8_t c45[32] = {0xcc,0xa7,0x21,0x75,0x1a,0x3a,0xab,0x91,0x69,0x4e,0x9c,0x46,0x84,0x0f,0x2d,0x36,0xad,0x49,0x55,0x82,0xda,0x5d,0x14,0x0d,0x3d,0x88,0x4b,0x55,0x84,0xeb,0x93,0xbc};
    sm2_fn_from_bytes(a, a45);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c45, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a46[32] = {0xf6,0xc7,0xd9,0x7a,0x20,0x34,0x0f,0xe9,0x0b,0x7f,0x21,0x66,0xf8,0x1b,0xda,0x57,0x91,0x4d,0xec,0x22,0xc7,0xe6,0xa7,0xec,0xd5,0x45,0xff,0xff,0x34,0x97,0x9f,0x7e};
    static std::uint8_t c46[32] = {0x56,0x7b,0xbd,0xa0,0x1d,0xf3,0x32,0xeb,0x19,0xcf,0x60,0xb7,0xb4,0xb6,0xed,0xb3,0x75,0x74,0x27,0x3c,0x3d,0x97,0x90,0xd9,0x2a,0x9f,0xaf,0xae,0x10,0x3d,0x64,0x70};
    sm2_fn_from_bytes(a, a46);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c46, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a47[32] = {0xf7,0xf7,0xdd,0xfd,0xe4,0x2c,0x69,0x35,0x08,0xe6,0xc0,0x85,0xef,0xe4,0x25,0xed,0x2e,0x00,0xbc,0xbe,0x54,0x33,0x96,0xfd,0x1f,0xd6,0x68,0x38,0x93,0x7d,0x2f,0xc8};
    static std::uint8_t c47[32] = {0x83,0xf1,0x5d,0xca,0x08,0x6a,0x27,0x47,0x4c,0x8d,0xa1,0x6b,0x0f,0x74,0xed,0xfb,0x9f,0x6c,0x4e,0xea,0x92,0xf5,0x0c,0x74,0x8b,0xfe,0x00,0xd0,0xa0,0xea,0x39,0x74};
    sm2_fn_from_bytes(a, a47);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c47, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a48[32] = {0x45,0x3d,0x7e,0xd5,0x34,0x43,0x28,0x92,0x78,0xd6,0xdb,0x5e,0xf2,0xe8,0x85,0xea,0x41,0xf8,0x0b,0x64,0x86,0xe2,0xda,0x4e,0x82,0x1a,0x99,0xe4,0xcb,0x30,0x1f,0x9e};
    static std::uint8_t c48[32] = {0x13,0x6e,0x64,0x55,0x7b,0xd2,0xdd,0x6d,0x4c,0x53,0x8b,0x97,0x29,0x0b,0xa4,0xf5,0x47,0x4d,0x64,0x53,0xf9,0x04,0xd6,0xb6,0xfc,0x12,0x78,0x8c,0x73,0x11,0xb1,0x57};
    sm2_fn_from_bytes(a, a48);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c48, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a49[32] = {0x6e,0x70,0xf8,0x7b,0x17,0x9b,0x76,0xfd,0x84,0x5e,0xfe,0x99,0x37,0x1c,0x17,0x42,0x19,0xd4,0x89,0x59,0xb1,0x85,0x12,0x4c,0x90,0x85,0xad,0xea,0x22,0x0e,0x8c,0x17};
    static std::uint8_t c49[32] = {0x66,0x72,0xfc,0x1e,0x6e,0x48,0x54,0x3e,0xbb,0x05,0x1d,0xe5,0x19,0x24,0x50,0xcf,0x49,0xff,0x6c,0x63,0x2c,0x77,0xd5,0xc1,0xc9,0xf4,0x46,0x90,0xed,0xf6,0x37,0xbb};
    sm2_fn_from_bytes(a, a49);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c49, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a50[32] = {0x47,0x2c,0xe1,0x6f,0xb5,0x10,0x3c,0xba,0x9f,0x13,0xd4,0x0a,0xc8,0xd1,0xae,0x3b,0x95,0xdb,0xbf,0xb9,0xb9,0xad,0x30,0x6c,0x81,0xb5,0x21,0x8f,0x19,0x91,0x02,0xa9};
    static std::uint8_t c50[32] = {0xcd,0xc4,0xe8,0x32,0x00,0x18,0x18,0x43,0x8b,0xbe,0x7c,0xe7,0x1b,0xb4,0x03,0xd7,0x39,0xcd,0xa7,0xd6,0xec,0x59,0xbc,0x4c,0xf3,0x28,0x9a,0xc7,0x82,0x3a,0xca,0x7d};
    sm2_fn_from_bytes(a, a50);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c50, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a51[32] = {0xf3,0xe0,0x9b,0x47,0x0f,0xf7,0xe8,0x4e,0xe2,0x0a,0xd3,0x4d,0xf3,0xf7,0x15,0x28,0xd7,0x54,0x20,0xef,0xed,0xcb,0x66,0xfe,0x0b,0xe7,0x58,0x12,0x87,0x75,0x4f,0xb2};
    static std::uint8_t c51[32] = {0xfd,0xdb,0xbd,0x26,0x73,0xdf,0x6d,0x4f,0xa5,0x70,0xd2,0x7a,0xe3,0x4a,0x44,0x84,0x76,0x30,0x0f,0x65,0x65,0xd3,0x56,0x30,0xa5,0xa0,0x4c,0x99,0x5b,0x47,0x7e,0x2e};
    sm2_fn_from_bytes(a, a51);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c51, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a52[32] = {0x18,0x2f,0x4d,0x6d,0xc4,0x66,0x65,0x99,0xaa,0xfa,0xf9,0x8c,0x24,0x48,0xb8,0x7d,0xe7,0x04,0x0f,0x30,0x5d,0xaa,0x36,0xcb,0xee,0x29,0x0c,0x6b,0xff,0x02,0x75,0xf5};
    static std::uint8_t c52[32] = {0x53,0x2f,0xa0,0xd2,0x02,0x75,0x6e,0x2f,0xb9,0x43,0xb9,0xa6,0x95,0xec,0x06,0xc7,0xa0,0xcc,0x7d,0x7e,0xe8,0x1b,0xa8,0x89,0x28,0xd0,0x68,0x1a,0xda,0x04,0x6b,0xe5};
    sm2_fn_from_bytes(a, a52);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c52, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a53[32] = {0x93,0x27,0xcc,0x4b,0xa8,0x39,0x38,0x1c,0x00,0xe4,0xb0,0x8a,0x2f,0x10,0xdb,0x89,0x67,0x3b,0x8e,0x69,0x0e,0x1a,0x30,0x23,0x24,0xec,0x73,0xed,0x6e,0x94,0xb9,0xa1};
    static std::uint8_t c53[32] = {0xb7,0x93,0x61,0xe5,0xda,0xdd,0x74,0xb8,0x61,0x47,0xcd,0x88,0xb3,0xee,0xe3,0x19,0x66,0x43,0x64,0xb1,0x78,0xc9,0x60,0x62,0xed,0x42,0x59,0xeb,0x6a,0xfa,0x8d,0x07};
    sm2_fn_from_bytes(a, a53);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c53, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a54[32] = {0x99,0x22,0xa5,0xa4,0x51,0x1e,0xf0,0xfe,0xe7,0x10,0xfc,0x55,0x11,0x4e,0x63,0xf7,0x24,0x14,0x5a,0x34,0xb6,0xfa,0x3d,0x43,0x23,0xdd,0xea,0x80,0x0e,0x5e,0x76,0x3a};
    static std::uint8_t c54[32] = {0x79,0xd6,0xff,0x10,0xaf,0x59,0xf8,0x5e,0xc2,0x02,0x86,0x50,0x55,0xaa,0x75,0x4d,0x69,0xe7,0x37,0x83,0x52,0x20,0xce,0x6d,0xbd,0xfa,0x80,0xdd,0x07,0x7c,0xcb,0x14};
    sm2_fn_from_bytes(a, a54);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c54, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a55[32] = {0x27,0xa8,0x3f,0xa6,0x70,0x7c,0xac,0xe3,0xde,0x46,0x4d,0x43,0x56,0xee,0x64,0x21,0x18,0x07,0x65,0x51,0xdf,0x50,0xc7,0x1f,0xd7,0xc3,0xf5,0x72,0x7c,0xe2,0x2d,0x10};
    static std::uint8_t c55[32] = {0xb6,0x92,0x25,0x2c,0xed,0x2b,0x41,0xcf,0x01,0xfa,0x47,0x86,0x81,0x48,0xf0,0xc5,0x74,0xd0,0xb9,0x36,0x99,0xf3,0x25,0x86,0x24,0x38,0x20,0xa5,0xc0,0x13,0x25,0x71};
    sm2_fn_from_bytes(a, a55);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c55, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a56[32] = {0x69,0x6f,0x0e,0x5b,0xd8,0x2b,0xb0,0xfa,0xde,0xab,0x54,0x5f,0x70,0x3f,0xf6,0xdd,0x85,0x36,0x0f,0x57,0xc4,0x32,0x8c,0x30,0x89,0xee,0x07,0x93,0xf8,0xcb,0x26,0xab};
    static std::uint8_t c56[32] = {0xf3,0xae,0xbf,0x5a,0x73,0x49,0xa4,0x27,0x0c,0xc1,0xbd,0x7e,0x48,0x0b,0x4a,0x78,0x70,0xd9,0xcc,0x03,0xa9,0xb2,0x41,0x7c,0x10,0xb4,0xa1,0x51,0x30,0xab,0x1d,0xdd};
    sm2_fn_from_bytes(a, a56);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c56, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a57[32] = {0x82,0x7c,0xc3,0x57,0x0a,0x70,0x21,0xcf,0x54,0x8e,0x14,0x53,0xa2,0x8d,0xa2,0x87,0x30,0x95,0xe4,0x5d,0xdc,0x46,0x16,0xdd,0x5d,0x18,0x4b,0x43,0x06,0x74,0xbe,0x5c};
    static std::uint8_t c57[32] = {0xfd,0xd8,0x01,0x53,0x47,0xad,0xb0,0x04,0x24,0x90,0x7c,0xc0,0x61,0x67,0xe9,0xd2,0xfd,0x0e,0x54,0x86,0x56,0xef,0xce,0x9a,0xa2,0x1d,0xb5,0x39,0xc1,0xab,0x92,0x58};
    sm2_fn_from_bytes(a, a57);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c57, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a58[32] = {0xa8,0xa7,0x4b,0x80,0xda,0x59,0xff,0x25,0x1d,0x11,0x1f,0xae,0x78,0x9b,0x12,0x8e,0xaa,0x9a,0x0a,0x2c,0x52,0x1c,0x2b,0xb2,0x2d,0x48,0x24,0x0a,0xfa,0x42,0xe5,0xac};
    static std::uint8_t c58[32] = {0x5f,0xce,0x36,0x1a,0x88,0x74,0xa3,0xb8,0x5f,0x8c,0x00,0x24,0x23,0x86,0x25,0x4a,0x06,0xb6,0xf0,0x76,0xc0,0xbe,0xc9,0xd3,0x33,0x70,0x93,0x2b,0xed,0x7f,0x14,0xf4};
    sm2_fn_from_bytes(a, a58);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c58, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a59[32] = {0x85,0x24,0x89,0xd4,0xcc,0xcf,0xe2,0x4c,0xb1,0xc5,0xd8,0x61,0x3f,0x96,0x3f,0x34,0xd6,0xba,0xcf,0x13,0x3b,0x91,0x04,0xab,0x71,0xe8,0x6b,0x17,0x25,0xcf,0x91,0x11};
    static std::uint8_t c59[32] = {0xca,0xf7,0x85,0x36,0x6a,0x17,0x20,0x0b,0xc0,0x60,0x8c,0x57,0x01,0xe9,0xa1,0x31,0x9c,0xba,0x34,0xc9,0xe9,0x3e,0xa3,0xfd,0xa6,0x2a,0x6b,0x46,0xb2,0x50,0xb1,0x0e};
    sm2_fn_from_bytes(a, a59);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c59, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a60[32] = {0x51,0x34,0x3f,0x8e,0x49,0x39,0x6a,0xe1,0x37,0xc7,0x3f,0x93,0xe3,0xf1,0x1d,0x81,0x19,0xfc,0xa2,0x6c,0xd9,0x60,0x27,0x37,0x61,0x39,0x00,0x5a,0x90,0x85,0xf7,0x25};
    static std::uint8_t c60[32] = {0xc5,0x3a,0x32,0x62,0xf1,0x94,0xf8,0x2d,0xe0,0x53,0x54,0x63,0x8c,0xa7,0x60,0xbf,0x37,0x3b,0x53,0x1d,0x2c,0x0d,0xee,0x77,0x59,0xdb,0x2f,0xa8,0x05,0xaf,0x3f,0x8a};
    sm2_fn_from_bytes(a, a60);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c60, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a61[32] = {0x12,0x9f,0x74,0x00,0x87,0xb5,0x6c,0x48,0x90,0xe5,0x05,0xb2,0xea,0x0d,0x44,0x64,0xa7,0x8a,0x64,0xd5,0xd2,0xc3,0x69,0xd0,0xf6,0x13,0x47,0xec,0xa5,0x07,0x91,0x5e};
    static std::uint8_t c61[32] = {0x32,0xea,0x2b,0xd8,0xe8,0xeb,0xfe,0xeb,0xa5,0xd1,0x67,0xe6,0x61,0x4c,0x55,0xc7,0x08,0xd9,0x67,0x8e,0xee,0x22,0x45,0xfb,0xe3,0xaa,0x05,0xe2,0x26,0xe0,0xa5,0x9a};
    sm2_fn_from_bytes(a, a61);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c61, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a62[32] = {0x7f,0xe9,0x6c,0x3b,0x69,0x9e,0xb2,0x7d,0x54,0xd4,0x9f,0x33,0xce,0xaa,0xfe,0x9f,0x51,0x95,0xac,0x7a,0x56,0x05,0xc8,0x0e,0x6f,0x52,0x6f,0xb4,0x89,0xb2,0xc6,0x5f};
    static std::uint8_t c62[32] = {0xb0,0x8a,0x2d,0x05,0x89,0xda,0xe6,0x1d,0x36,0xbe,0x44,0x98,0x4c,0x81,0x56,0x86,0x5a,0xb3,0xb2,0xc8,0xc7,0x58,0x68,0x84,0x2c,0x24,0x5b,0x37,0x2b,0xc1,0x1b,0xd0};
    sm2_fn_from_bytes(a, a62);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c62, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a63[32] = {0x58,0xff,0x14,0xdc,0x08,0xb6,0x8d,0x50,0x15,0x24,0xa5,0x4e,0x89,0x01,0xfa,0xf3,0xf2,0x4a,0x9a,0xa1,0x44,0x0f,0x40,0x79,0x73,0xc3,0x43,0x24,0x76,0x77,0xd8,0x3f};
    static std::uint8_t c63[32] = {0xb8,0xc0,0x9c,0x3b,0x2d,0x88,0xa3,0x62,0xcc,0xd7,0xfc,0xd6,0xa8,0x26,0x66,0xd1,0xfc,0xbf,0x24,0xc4,0xdf,0x37,0x4e,0x71,0x66,0x06,0x12,0xed,0xaf,0x87,0xc8,0x9f};
    sm2_fn_from_bytes(a, a63);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c63, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a64[32] = {0x30,0xcb,0xa4,0x31,0xe9,0x62,0x7f,0x05,0xe3,0xb5,0xc1,0xc6,0x1a,0x22,0x21,0x7e,0xb9,0xf9,0x30,0xcb,0x9e,0x20,0xd2,0x02,0x72,0x38,0x1d,0xe0,0x54,0xf0,0x5b,0x64};
    static std::uint8_t c64[32] = {0x7d,0x5b,0xe2,0x76,0x52,0x30,0x6c,0x24,0x1f,0xa2,0xfa,0x11,0xa2,0xa4,0x32,0x62,0xb7,0x1d,0x27,0x3a,0x62,0x0f,0x05,0xed,0x67,0x1a,0x58,0xb8,0x74,0x2a,0x43,0x7a};
    sm2_fn_from_bytes(a, a64);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c64, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a65[32] = {0xa9,0xc5,0xbe,0x3b,0xc5,0xc4,0xc8,0x0a,0x79,0x61,0x6c,0x31,0xc9,0x4f,0x96,0xfb,0xa9,0x47,0xa2,0x15,0xe5,0x8a,0x48,0x13,0x70,0x54,0xc2,0x75,0x99,0xb6,0xc1,0xd6};
    static std::uint8_t c65[32] = {0xa7,0x5d,0x54,0xf5,0x2e,0xb2,0xab,0x39,0xba,0x88,0x2a,0xeb,0xfe,0xa0,0x60,0x80,0x52,0xc3,0x40,0xad,0x58,0xe9,0xdb,0x59,0xc6,0xa3,0x36,0xae,0x37,0xee,0xf3,0x2c};
    sm2_fn_from_bytes(a, a65);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c65, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a66[32] = {0x63,0xec,0x82,0x78,0x0f,0xd4,0x4a,0x0f,0xa7,0x88,0x3f,0x78,0x6c,0x41,0x93,0x36,0xfd,0x6d,0x2b,0x70,0x4e,0xb3,0xb8,0x86,0x8b,0x07,0xca,0xbb,0x73,0xe8,0x55,0x49};
    static std::uint8_t c66[32] = {0x26,0x4f,0xd9,0xd3,0xa4,0x20,0x27,0xec,0x73,0x35,0xef,0xbe,0xb1,0x4d,0x2f,0xd2,0xaf,0x48,0x71,0x2b,0x82,0x23,0x4c,0x9a,0xc9,0xbd,0x26,0x71,0x07,0x1b,0x77,0xe6};
    sm2_fn_from_bytes(a, a66);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c66, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a67[32] = {0xf5,0xb3,0xad,0xa0,0x0c,0x37,0x75,0xfb,0xdf,0x1b,0xc2,0xe0,0x80,0xf1,0x94,0x64,0x9d,0xb6,0xb4,0x53,0xe7,0xca,0x77,0x6e,0x76,0xd2,0xbe,0x5c,0x06,0x9c,0x00,0x96};
    static std::uint8_t c67[32] = {0xe1,0x69,0x37,0xbc,0xfa,0x96,0x82,0x3e,0xd1,0x25,0x5c,0x2b,0x20,0x9f,0x9c,0x8f,0xb5,0x9d,0x14,0x41,0x6b,0xd6,0x27,0xd7,0x00,0x15,0x8a,0xfb,0xb8,0x56,0x13,0x24};
    sm2_fn_from_bytes(a, a67);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c67, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a68[32] = {0xe9,0xea,0x3c,0x20,0xd6,0x7c,0x51,0xe3,0x98,0xef,0x5e,0x92,0xee,0xce,0xb6,0x40,0x7d,0xa1,0xab,0xaa,0xf3,0x99,0xed,0x33,0xa4,0x74,0xf6,0x7e,0xae,0xb2,0x0c,0x76};
    static std::uint8_t c68[32] = {0xe8,0x7c,0x0f,0x20,0xd7,0x89,0xe0,0x5d,0xcf,0x10,0xb2,0xf1,0xde,0xff,0xe0,0x97,0x2a,0x07,0x27,0x2d,0xef,0xa9,0x87,0x6a,0x87,0xf9,0xb0,0x8c,0x3f,0xe6,0xe1,0x47};
    sm2_fn_from_bytes(a, a68);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c68, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a69[32] = {0x78,0x5a,0x4b,0x19,0x72,0x00,0xd6,0xd7,0x02,0xfa,0x9b,0xa9,0xf5,0x8f,0x0b,0xce,0x8a,0xac,0x9c,0x89,0x2a,0x77,0x66,0x2b,0x89,0xc0,0x45,0xf8,0x9b,0x5b,0x72,0x8d};
    static std::uint8_t c69[32] = {0xb9,0xed,0x1d,0x42,0x1a,0xf9,0x21,0x5b,0xb1,0x87,0x41,0x5b,0xff,0x0f,0xcc,0x97,0xcb,0xd8,0xb0,0x61,0x96,0xe5,0x60,0xca,0xae,0x1d,0x4f,0x98,0x15,0xde,0xb5,0x3c};
    sm2_fn_from_bytes(a, a69);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c69, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a70[32] = {0xa5,0x79,0x5c,0xbb,0xbb,0x88,0x05,0x90,0x21,0x32,0x52,0x4b,0x0d,0xd8,0xf7,0x1b,0xe4,0x58,0xd1,0x29,0x7f,0x67,0xbc,0x13,0xee,0xc7,0x1a,0x65,0x87,0x95,0x3f,0x43};
    static std::uint8_t c70[32] = {0x0c,0x45,0x65,0x3d,0x08,0xd3,0x16,0xea,0x87,0x81,0xee,0x48,0x5b,0xfb,0x80,0x28,0x92,0x0f,0xee,0x7d,0x3e,0x12,0x5d,0x7e,0xea,0x77,0xe4,0x95,0xdb,0x38,0x37,0x3a};
    sm2_fn_from_bytes(a, a70);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c70, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a71[32] = {0xe7,0xe7,0x2a,0x68,0xec,0xbb,0xf1,0x8e,0xf0,0x6a,0xf5,0x99,0xc9,0x56,0xb3,0xfd,0xdb,0x4f,0x8b,0x13,0x26,0x63,0x52,0xaf,0xb2,0x88,0xf6,0x56,0x3a,0x3e,0x6e,0x14};
    static std::uint8_t c71[32] = {0xd9,0xea,0x3a,0x95,0x31,0xbe,0x5e,0xe4,0x1b,0xc5,0x03,0x39,0x29,0x76,0x4a,0x95,0xf6,0x36,0x68,0x0e,0x3e,0x14,0x47,0xbf,0x14,0xc0,0xfe,0xd1,0xd9,0xc5,0x9e,0x62};
    sm2_fn_from_bytes(a, a71);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c71, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a72[32] = {0xb9,0x6a,0x10,0x7d,0xd2,0x04,0xd0,0xc3,0x25,0x1f,0xbb,0xb6,0xad,0xc0,0x25,0x2d,0x3c,0x40,0x82,0x95,0x5f,0xc6,0x2d,0x8f,0x56,0xe2,0x99,0xdf,0x71,0x25,0xdb,0x4f};
    static std::uint8_t c72[32] = {0xf6,0x30,0x1a,0xa7,0x17,0x05,0x0b,0xc6,0x3a,0xac,0xbe,0x08,0xf1,0xc3,0xb5,0x09,0x9f,0xbd,0x50,0x92,0xc6,0x89,0x73,0x11,0xd5,0x09,0x62,0xd8,0x67,0x33,0xbe,0xca};
    sm2_fn_from_bytes(a, a72);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c72, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a73[32] = {0x42,0xdf,0x4a,0x4e,0x26,0xdc,0x84,0x11,0xdf,0x1f,0x1e,0x33,0x3f,0x0a,0x56,0x99,0x5b,0xc3,0x05,0xd0,0xe9,0xb6,0x02,0xec,0xd6,0x81,0x90,0x7b,0xc9,0x46,0x00,0x53};
    static std::uint8_t c73[32] = {0xdf,0x33,0xfc,0x39,0xf5,0xd2,0xd5,0xf4,0xad,0x0d,0x4c,0x1d,0x72,0x24,0x1c,0xad,0xeb,0x9b,0xae,0x82,0x8a,0x87,0xcb,0xd9,0x83,0x28,0x73,0x26,0x4e,0x9a,0xa5,0x86};
    sm2_fn_from_bytes(a, a73);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c73, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a74[32] = {0x69,0x13,0xa4,0x2c,0x9c,0x2f,0xbe,0x74,0x61,0xef,0x2e,0x99,0x0c,0xe7,0xc7,0xff,0xa2,0x18,0xbf,0xa8,0x7d,0x18,0xd3,0x02,0x0c,0xd9,0xbb,0x71,0xa1,0xda,0x93,0x3e};
    static std::uint8_t c74[32] = {0x5b,0x82,0x31,0xf8,0xe0,0x54,0xbd,0x30,0x9c,0xe5,0x96,0x68,0x17,0x6c,0xc6,0xac,0x30,0xc8,0x9a,0x01,0xba,0xab,0x63,0x48,0xba,0x84,0x43,0x12,0xe2,0x2c,0x6d,0x61};
    sm2_fn_from_bytes(a, a74);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c74, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a75[32] = {0x56,0xea,0x0d,0xd2,0x5b,0xf0,0x82,0x93,0x9a,0x2c,0x67,0x41,0xe1,0x5f,0xc0,0x12,0x1e,0x1e,0x10,0x36,0x81,0x27,0x9a,0xac,0x14,0x04,0x7e,0x8f,0xd2,0x33,0x0f,0x43};
    static std::uint8_t c75[32] = {0x59,0xdb,0xce,0xb5,0x5d,0x29,0x42,0xfc,0x6f,0xf9,0x41,0xe2,0xc5,0x2a,0x5a,0x8d,0x15,0xcf,0xfe,0xa9,0x08,0xe9,0x5a,0x0d,0xbb,0xe6,0xc6,0x66,0x7a,0x98,0xcd,0x52};
    sm2_fn_from_bytes(a, a75);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c75, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a76[32] = {0xc2,0xa4,0xb4,0xfc,0xab,0x21,0x7c,0xf7,0x97,0x90,0x39,0xac,0x2b,0xe3,0x28,0x80,0xff,0x72,0x0c,0x32,0x36,0x3f,0x5e,0x1c,0x2a,0x75,0x29,0x33,0x1b,0x0d,0x72,0xa4};
    static std::uint8_t c76[32] = {0x7b,0x90,0x0a,0xc5,0x88,0xd1,0x92,0x1b,0xa8,0x72,0x75,0x73,0x52,0x21,0x55,0x7f,0x66,0x3d,0xae,0x3f,0x68,0x48,0xb3,0xc4,0xbf,0x4a,0x39,0x35,0x3b,0xaf,0x51,0xa7};
    sm2_fn_from_bytes(a, a76);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c76, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a77[32] = {0xca,0x69,0xaf,0x20,0xdd,0xca,0x24,0x45,0x92,0x00,0x5a,0x68,0xa7,0xba,0xdc,0x49,0xa9,0x3b,0x45,0x42,0x88,0xf6,0xcd,0x4e,0x8b,0x07,0x7e,0xb5,0xbc,0xc1,0x4f,0x6e};
    static std::uint8_t c77[32] = {0x09,0xb8,0x8f,0x41,0x3e,0x55,0x07,0x67,0xb8,0x92,0x6b,0x11,0xac,0x24,0xcc,0x1e,0xf8,0x98,0x61,0x53,0xc4,0x54,0x02,0x3d,0x6c,0x82,0x92,0x63,0xb9,0xeb,0x01,0x2a};
    sm2_fn_from_bytes(a, a77);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c77, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a78[32] = {0x4b,0xa3,0xf5,0x56,0x2f,0x3e,0x69,0x53,0x33,0xf8,0x0b,0x49,0x9c,0x68,0x07,0x41,0xa8,0x6a,0xd8,0xab,0xba,0xbf,0xdd,0x2d,0x23,0xed,0x7b,0xfd,0x45,0xb7,0xe6,0xa8};
    static std::uint8_t c78[32] = {0x2a,0x54,0x13,0x26,0xa8,0x09,0x04,0xf3,0x9c,0x83,0x68,0x3d,0xba,0x0f,0xe9,0xe0,0x3c,0x97,0x98,0xae,0x24,0x05,0x90,0x46,0x5b,0x7d,0xbe,0x32,0xb7,0x5a,0x4e,0xa3};
    sm2_fn_from_bytes(a, a78);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c78, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a79[32] = {0x68,0x38,0x7e,0xa4,0x5b,0x40,0xd7,0xea,0xbf,0x3c,0x13,0x32,0x57,0x2b,0xbb,0xbd,0x47,0x4c,0x03,0xf3,0x12,0x07,0x08,0x3f,0x64,0x94,0x2d,0xa2,0x64,0x1a,0x01,0xc3};
    static std::uint8_t c79[32] = {0xcf,0xef,0x71,0xd5,0xee,0x24,0x43,0x29,0x51,0x26,0x18,0x12,0x83,0xb7,0xc7,0x7e,0x92,0x72,0x1b,0xaf,0xf9,0x66,0x9b,0x1b,0xbe,0x90,0x06,0xe1,0xeb,0x98,0xc1,0x5b};
    sm2_fn_from_bytes(a, a79);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c79, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a80[32] = {0xbd,0xfc,0x1b,0x10,0x2a,0xc1,0xd9,0xbc,0x81,0x7e,0x1f,0x8a,0x49,0x17,0xca,0x86,0x7c,0xbe,0xb9,0xd0,0x4f,0x2f,0x2a,0xff,0xe6,0x14,0x83,0x0a,0xd0,0x03,0x1e,0x0b};
    static std::uint8_t c80[32] = {0x01,0x07,0x43,0xcd,0x7e,0x17,0x34,0x58,0x7c,0xd4,0x8b,0x95,0x3d,0xbf,0xf6,0x02,0x8a,0x97,0x3c,0xb9,0xa7,0x1c,0x79,0x15,0x99,0x2d,0x80,0x8e,0x02,0x6b,0x06,0x04};
    sm2_fn_from_bytes(a, a80);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c80, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a81[32] = {0x4c,0xfd,0xc8,0xc0,0x08,0x6a,0x27,0x28,0xc8,0xf2,0xc1,0x6a,0x78,0x55,0x6a,0x8e,0x33,0x04,0xba,0x02,0x0d,0xb7,0xad,0x09,0x9e,0x01,0xcd,0xbb,0x6c,0x5f,0x75,0xb3};
    static std::uint8_t c81[32] = {0xbf,0xc1,0x52,0x36,0x17,0x30,0x13,0x1e,0x50,0x35,0xc6,0xea,0xd9,0x2c,0x0b,0x1b,0x54,0x80,0x3b,0xea,0x82,0xb6,0x51,0xb1,0xf3,0x82,0xcc,0x81,0xea,0x6b,0x6e,0xfd};
    sm2_fn_from_bytes(a, a81);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c81, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a82[32] = {0x6d,0x6a,0x36,0xee,0xf8,0x0e,0xb6,0x48,0x0a,0x5a,0xc8,0x58,0xf2,0xc2,0x2c,0x95,0xc8,0x43,0x92,0xff,0x3a,0xa8,0xf6,0xc6,0x20,0xa6,0x7c,0xf6,0xfc,0x38,0xb7,0xb0};
    static std::uint8_t c82[32] = {0x8e,0xea,0x1f,0x65,0xc5,0x36,0xc4,0xde,0xaa,0x27,0x9d,0x50,0x97,0x57,0x23,0xc3,0x9e,0xc3,0xf8,0xc2,0x53,0x15,0x91,0xed,0x6c,0x4a,0x20,0xb8,0x0f,0x14,0x2d,0x76};
    sm2_fn_from_bytes(a, a82);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c82, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a83[32] = {0x6e,0x06,0xe8,0xe9,0x02,0xca,0xa5,0xf2,0x0a,0xd1,0xf4,0x2f,0x21,0xf0,0xa2,0x22,0x2d,0xed,0xdb,0x58,0x70,0x13,0xd6,0xc1,0xf7,0x2a,0x6a,0x1a,0xcc,0xe3,0x6d,0x64};
    static std::uint8_t c83[32] = {0x8a,0xf4,0xc7,0x29,0x99,0xd1,0x83,0x1c,0xe7,0x9e,0x8c,0x9e,0xe3,0xe0,0xad,0x27,0x4b,0xde,0x62,0x6e,0x72,0xe3,0xa4,0x98,0xb5,0x47,0x69,0xef,0x72,0xc3,0x2b,0xa6};
    sm2_fn_from_bytes(a, a83);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c83, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a84[32] = {0x50,0x01,0xcd,0xa4,0xda,0x57,0x4e,0xb9,0x7b,0x65,0x0a,0xc1,0x3f,0xc3,0x6f,0xe1,0xd7,0xbd,0x53,0x84,0x67,0x48,0x23,0x8a,0x79,0x14,0x6d,0xbb,0xe8,0xff,0x9b,0x77};
    static std::uint8_t c84[32] = {0x24,0xa9,0xf1,0x38,0x0b,0x52,0x62,0x90,0xcc,0xd4,0xf8,0xd9,0x1c,0x2b,0xb3,0xdc,0x46,0x60,0xf7,0xbc,0xa7,0xb5,0xc0,0x39,0x1f,0x3d,0xe3,0x2b,0x50,0x93,0x6b,0x4a};
    sm2_fn_from_bytes(a, a84);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c84, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a85[32] = {0x17,0x0c,0x0a,0xac,0x6c,0xa7,0xcd,0x4d,0xb5,0xd6,0x74,0xa9,0x42,0x9e,0x45,0xcf,0xcb,0xc7,0xf4,0x97,0x42,0x0a,0x7c,0x75,0xe8,0xf2,0xef,0x58,0xcc,0x8c,0x40,0xa0};
    static std::uint8_t c85[32] = {0x50,0x3d,0xbf,0x6d,0x0c,0x90,0xef,0x05,0x4a,0xa5,0x16,0x65,0x42,0x2d,0x2e,0xf2,0x65,0x74,0x45,0x32,0x8a,0x7e,0x9c,0x72,0xf8,0x96,0xa1,0x3f,0x55,0x8a,0x0d,0x4a};
    sm2_fn_from_bytes(a, a85);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c85, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a86[32] = {0xaa,0xd6,0x2e,0xc4,0xd9,0x6a,0xee,0xa9,0x61,0xfe,0x31,0x26,0x94,0x1d,0x73,0xbe,0x2b,0x3f,0x91,0x91,0xec,0xfe,0x84,0xbe,0xa0,0xca,0x31,0x64,0x6c,0x42,0x71,0xb9};
    static std::uint8_t c86[32] = {0x19,0xd4,0x6b,0xa0,0x1e,0x90,0x54,0x1f,0xb9,0x2c,0xb5,0x85,0x4a,0x3a,0x1d,0x76,0x93,0x63,0xce,0x1a,0x80,0x8c,0x13,0xcf,0x82,0xc4,0xf8,0x3d,0xe4,0xca,0x0e,0xb4};
    sm2_fn_from_bytes(a, a86);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c86, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a87[32] = {0x55,0x94,0xa2,0x53,0x35,0xbd,0x1e,0x00,0x04,0xad,0x80,0x3d,0x2b,0xb8,0xe1,0xeb,0xa1,0xa7,0xd7,0x05,0xf9,0x1c,0xd5,0x32,0x15,0x32,0x37,0x11,0x0b,0x3b,0x6b,0x24};
    static std::uint8_t c87[32] = {0x0d,0x57,0xcd,0x89,0x9d,0x0e,0x00,0x75,0xa4,0xfa,0xa6,0xe7,0xce,0x37,0xaf,0x3f,0x73,0x10,0xbf,0x80,0x71,0xc2,0x1d,0xa4,0x4c,0xdb,0x8b,0x19,0xf5,0x32,0x03,0x49};
    sm2_fn_from_bytes(a, a87);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c87, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a88[32] = {0xf4,0xf9,0xd7,0xa5,0x0e,0x5b,0x85,0xc5,0x3b,0x88,0xd0,0xfa,0x22,0xe2,0x64,0x5b,0xdf,0x54,0x9e,0x18,0x0a,0x15,0x52,0xfd,0x54,0x2c,0x53,0x5a,0xe2,0x58,0xea,0x1d};
    static std::uint8_t c88[32] = {0x26,0xfc,0x28,0xb5,0x9f,0x39,0xc1,0xfe,0xbc,0x84,0xf4,0x76,0x11,0x2e,0x67,0x65,0x4e,0x1f,0x22,0xf1,0x84,0x2e,0x61,0x9c,0xdb,0x84,0x2c,0x8d,0xd4,0xe6,0x10,0xbe};
    sm2_fn_from_bytes(a, a88);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c88, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a89[32] = {0x5d,0x88,0x94,0x1e,0xf6,0x85,0xc0,0x87,0xaa,0xcd,0x8e,0xca,0x4d,0xb6,0xc6,0xd3,0x61,0x83,0x7b,0xe9,0x34,0x34,0xf3,0x21,0x64,0x7b,0xcf,0x0c,0xde,0x1c,0x13,0x24};
    static std::uint8_t c89[32] = {0xbd,0xf5,0xf8,0xcc,0xaf,0x2a,0x19,0x41,0xe8,0x70,0x7e,0x21,0xf4,0x74,0x43,0x6b,0x79,0x26,0x6c,0x9f,0xf3,0x32,0x8c,0x59,0x37,0x30,0x88,0xc7,0xdb,0xf2,0x95,0xec};
    sm2_fn_from_bytes(a, a89);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c89, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a90[32] = {0xad,0x05,0x13,0x1d,0x05,0xe4,0x79,0xbb,0x04,0xff,0x92,0x7d,0xec,0x21,0x64,0x36,0x89,0xb4,0x6c,0xf3,0xf9,0xca,0xd5,0x52,0xf3,0x36,0xbe,0xef,0x75,0x06,0x4e,0x4f};
    static std::uint8_t c90[32] = {0xf9,0x72,0x09,0xfe,0xf2,0x98,0x52,0x22,0xdf,0x9e,0x49,0x19,0xc3,0x04,0x7f,0xf8,0x0c,0x03,0xa6,0x7f,0x01,0x41,0xb4,0x6a,0x45,0x90,0x23,0x66,0xb2,0x0f,0x46,0x9e};
    sm2_fn_from_bytes(a, a90);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c90, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a91[32] = {0xba,0x6d,0x8c,0xf8,0xa1,0x1d,0x6d,0xe7,0xf8,0x6f,0x98,0xf1,0xa1,0xf2,0x93,0xce,0xfe,0x2e,0x34,0x18,0x73,0x98,0xea,0x38,0x87,0x23,0xaf,0x2b,0x21,0xc3,0x82,0xef};
    static std::uint8_t c91[32] = {0xed,0xf2,0x16,0xc3,0x57,0x27,0xba,0xee,0x03,0x29,0x59,0xd1,0x3e,0x64,0x06,0x92,0x81,0xc0,0x7f,0xf0,0xcf,0xf2,0x81,0x63,0x55,0xcd,0x2c,0xc6,0xae,0x9b,0xd4,0xe7};
    sm2_fn_from_bytes(a, a91);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c91, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a92[32] = {0xca,0x0f,0x17,0xda,0xd3,0xcf,0xb9,0xb1,0x66,0x0c,0x9a,0xe3,0x4c,0x80,0x05,0x81,0xb5,0xfb,0xbb,0x1b,0xd6,0x45,0x22,0xfb,0xb1,0xf9,0x04,0xa6,0xcc,0x69,0x50,0x1a};
    static std::uint8_t c92[32] = {0x75,0x0b,0xd5,0x4c,0x36,0x58,0xd1,0x3a,0x6a,0x1a,0x89,0xd1,0xd0,0x53,0xd8,0x46,0x66,0x89,0xda,0xf1,0x56,0xfa,0x3c,0x68,0xea,0x91,0x67,0x38,0xe8,0xf8,0xd4,0x0a};
    sm2_fn_from_bytes(a, a92);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c92, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a93[32] = {0x1d,0x1a,0x30,0x9f,0x36,0x74,0x1f,0x66,0xb7,0x32,0x0f,0xc9,0x1d,0x17,0x50,0xc1,0xc1,0x2b,0x76,0xff,0x35,0x03,0x17,0x13,0x6a,0x7e,0xc2,0x6d,0xe7,0xb5,0x1c,0xd9};
    static std::uint8_t c93[32] = {0x0b,0x12,0x68,0xbe,0x30,0x90,0x82,0x9a,0xc9,0x24,0xe2,0x28,0x47,0x11,0x38,0xaa,0x11,0xac,0xda,0x6d,0x55,0xe1,0x88,0xb1,0x6b,0x31,0x37,0xa2,0x1b,0x41,0x21,0x7f};
    sm2_fn_from_bytes(a, a93);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c93, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a94[32] = {0x04,0x2b,0x2a,0x6a,0xe4,0x34,0x9c,0x75,0x36,0xa3,0xc9,0x9b,0x52,0x7c,0xce,0x82,0x7f,0x12,0x95,0xad,0x13,0xf5,0xdc,0xc0,0xc6,0xd4,0xcf,0x97,0xc2,0xcb,0xfa,0x29};
    static std::uint8_t c94[32] = {0xe3,0xa9,0xc2,0x4b,0x2e,0xc7,0x2b,0x3b,0x31,0x85,0xc5,0x42,0xc7,0x68,0xca,0x2a,0x63,0x6a,0x92,0x3e,0x9a,0x03,0xef,0x9f,0x69,0x90,0x1c,0x43,0xdb,0x19,0xdf,0x87};
    sm2_fn_from_bytes(a, a94);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c94, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a95[32] = {0xf7,0xd5,0xbd,0xb8,0xb8,0xb8,0xf5,0x0d,0xce,0x66,0xd7,0xe8,0xfd,0x87,0xca,0x35,0x2d,0x49,0x21,0x9b,0x08,0x91,0x90,0x40,0x30,0x0f,0xc8,0xef,0x27,0xcf,0xae,0xdb};
    static std::uint8_t c95[32] = {0x8f,0xf8,0xde,0x9d,0x9f,0xbf,0x63,0x00,0xd7,0xbe,0x51,0x51,0xd0,0xcc,0xd2,0x71,0x94,0x57,0x1e,0x07,0x24,0xc2,0x09,0x2a,0x4e,0x0f,0x35,0x1e,0xd7,0x89,0xb6,0x40};
    sm2_fn_from_bytes(a, a95);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c95, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a96[32] = {0xd3,0x68,0x01,0xd8,0xb2,0x19,0xdd,0xba,0xb3,0xb8,0xec,0x2a,0xaa,0xc5,0x7c,0x6e,0x11,0xf5,0xf4,0x18,0x11,0x09,0xdf,0x8c,0x2c,0x43,0x89,0xeb,0x1d,0xdb,0x11,0x99};
    static std::uint8_t c96[32] = {0x2a,0x92,0xe6,0x05,0x13,0x5e,0xcf,0x38,0x25,0x4c,0xb0,0x80,0x62,0x78,0x39,0xf3,0xbe,0xbd,0xcf,0x2f,0xa6,0xa2,0xdf,0x3f,0x08,0xe8,0x42,0xc0,0xef,0x15,0x07,0x93};
    sm2_fn_from_bytes(a, a96);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c96, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a97[32] = {0x18,0xb5,0x2e,0xa6,0xa3,0x33,0x24,0x2c,0x59,0x0a,0xc4,0x7c,0x4d,0x98,0x3b,0xf5,0xdf,0xc6,0x82,0x85,0x24,0xbb,0x21,0x15,0x44,0x3e,0x35,0x17,0x25,0xac,0x09,0x60};
    static std::uint8_t c97[32] = {0x44,0x6e,0x9e,0x16,0x2a,0x10,0x89,0xfa,0x8b,0x51,0x4d,0xc1,0x7b,0xb4,0x1e,0x0f,0x7e,0x60,0x17,0x4f,0x9a,0x9a,0x03,0xac,0x25,0xbd,0x1f,0xd8,0x04,0xaf,0xd9,0x02};
    sm2_fn_from_bytes(a, a97);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c97, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a98[32] = {0xe1,0x6e,0x18,0x80,0x42,0x76,0x51,0x39,0x8c,0xda,0x7c,0xb8,0xef,0xec,0xbe,0xa2,0x14,0xf5,0xde,0x0d,0x3b,0xa2,0x45,0x25,0x02,0x1c,0x85,0x80,0x0c,0xd1,0xf3,0x1b};
    static std::uint8_t c98[32] = {0x8f,0xdf,0x0d,0x3d,0x92,0xb4,0x2f,0x66,0x1c,0x63,0x86,0xdb,0x2f,0x6a,0x9f,0xa4,0x69,0xc2,0x74,0xc3,0xb1,0xc7,0x68,0x6b,0x34,0x7f,0xe8,0xa9,0xbe,0x55,0xb2,0xdb};
    sm2_fn_from_bytes(a, a98);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c98, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }

    static std::uint8_t a99[32] = {0xce,0x53,0xe4,0x04,0x54,0x83,0x90,0x0c,0x04,0x16,0xc7,0x49,0x05,0x48,0x8a,0x3b,0x8f,0x05,0x5c,0xfb,0x0e,0x1e,0xb5,0x95,0xb0,0x6e,0x20,0x30,0x21,0x27,0x13,0x0c};
    static std::uint8_t c99[32] = {0x5e,0x5c,0xc8,0x14,0xea,0xc0,0xb2,0xb1,0x19,0x1e,0x3f,0xa1,0xc4,0x82,0x7b,0x26,0x46,0x58,0xe1,0x18,0xf0,0xd8,0xc8,0x41,0x42,0x62,0x7a,0xc8,0x54,0x89,0x27,0x49};
    sm2_fn_from_bytes(a, a99);
    sm2_fn_inv(c, a);
    sm2_fn_to_bytes(c_data, c);
    if (std::memcmp(c99, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_inv");
    }
}